import React from 'react'
import { NavBar, Space, Toast } from 'antd-mobile'
import style from '../tabbar/tabbar.module.css'
import { useNavigate } from 'react-router-dom'

function Navbar(props) {
    const nav = useNavigate()
    const back = () =>{
        nav(-1)
    }

    return (
        <div style={{ background:'#fff',position: 'fixed', top: 0, left: 0, width: '100%', zIndex: 100,borderBottom:'1px solid #f0f0f0ff' }}>
            <NavBar onBack={back}>{props.title}</NavBar>
        </div>
    )
}

export default Navbar
